

:root {
    color-scheme: light dark;
}

body {
    margin: 0;
    background-color: #f4f4f4;
    color: #000000;
    font-size: 16px;

    /* ★フォント適用（custom/preset/google 全対応） */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, "Noto Sans JP", sans-serif;
}

body {
    background-color: light-dark(#f4f4f4, #f4f4f4);
    color: light-dark(#000000, #000000);
}

form input,
form textarea,
form select,
form button {
    color-scheme: light;

    /* ★フォーム類も同じフォントに */
    font-family: inherit;
}

a {
    color: #0000FF;
    color: light-dark(
        #0000FF,
        #0000FF    );
}
a:visited {
    color: #663399;
    color: light-dark(
        #663399,
        #663399    );
}
a:active {
    color: #FF0000;
    color: light-dark(
        #FF0000,
        #FF0000    );
}

.quote-text {
    color: #0008ff;
    color: light-dark(
        #0008ff,
        #0008ff    );
}

.comment-text {
    color: #333333;
    color: light-dark(
        #333333,
        #333333    );
}

.note-text {
    color: #333333;
    color: light-dark(
        #333333,
        #333333    );
}

.name {
    color: #007700;
    color: light-dark(
        #007700,
        #007700    );
}

.cap {
    color: #ff4500;
    color: light-dark(
        #ff4500,
        #ff4500    );
}

.deleted-message {
    color: #ff0000;
    color: light-dark(
        #ff0000,
        #ff0000    );
}

.error-message {
    color: #ff0000;
    color: light-dark(
        #ff0000,
        #ff0000    );
}

hr {
    border: none;
    border-top: 1px solid #000000;
    border-top-color: light-dark(
        #000000,
        #000000    );
}

.embed-post {
    background-color: #f4f4f4;
    color: #000000;
    background-color: light-dark(
        #f4f4f4,
        #f4f4f4    );
    color: light-dark(
        #000000,
        #000000    );
}

mark {
    background-color: transparent;
    color: inherit;
    margin: 0 5px;
}

/* パンくずリスト */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    list-style: none;
    padding-left: 0;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
    display: inline-block;
    padding: 0 0.5rem;
    content: ">";
    vertical-align: middle;

    color: #000000;
    color: light-dark(
        #000000,
        #000000    );
}

/* 最後のパンくずリスト項目のリンクを無効にする */
.breadcrumb-item:last-child a {
    pointer-events: none;
    color: inherit;
    text-decoration: none;
}

/* スマートフォン用スタイル */
@media (max-width: 640px) {
    .embed-contents {
        position: relative;
        width: 100%;
        max-height: 200px;
        overflow: hidden;
    }
    .embed-instagram {
        width: 100%;
        height: 360px !important;
        max-height: 360px !important;
    }

    .embed-video iframe {
        width: 100%;
        height: 360px !important;
        max-height: 360px !important;
    }

    .embed-youtube iframe {
        width: 100%;
        height: 360px !important;
        max-height: 360px !important;
    }

    .embed-youtube {
        width: 100%;
        height: 360px !important;
        max-height: 360px !important;
    }

    .img-thumbnail, .embed-youtube-img, .embed-image, .video-thumbnail {
        max-width: 128px;
        max-height: auto;
    }
}

/* パソコン用スタイル */
@media (min-width: 641px) {
    .embed-contents {
        position: relative;
        width: 100%;
        max-height: 350px;
        overflow: hidden;
    }

    .embed-instagram {
        width: 600px;
        height: 360px !important;
        max-height: 360px !important;
    }

    .embed-video iframe {
        width: 600px;
        height: 360px !important;
        max-height: 360px !important;
    }

    .embed-youtube iframe {
        width: 600px;
        height: 360px !important;
        max-height: 360px !important;
    }

    .img-thumbnail, .embed-youtube-img, .embed-image, .video-thumbnail {
        max-width: 128px;
        max-height: auto;
        cursor: pointer;
    }
}

img.emoji {
    height: 1em;
    width: 1em;
    margin: 0 .05em 0 .1em;
    vertical-align: -0.1em;
}

img {
    max-height: 512px;
}

:root {
    --bs-body-bg: #f7f3eb !important;
}

input, textarea {
    background-color: #ffffff !important; /* 白色 */
}

.embed-post {
    padding: 12px;
}

.btn-spacing {
    margin-right: 10px;
}

/* ページナビゲーションのスタイル */
.pagination-links {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

/* トップ/ボトムへのリンクのスタイル */
#top,
#btm {
    color: #8a6d3b;
    text-decoration: none;
    font-weight: bold;
}

#top:hover,
#btm:hover {
    text-decoration: underline;
}

/* 投稿本文のスタイル */
.post-content {
    border-bottom: 1px solid #e6ddd0;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

/* 投稿リストの間隔 */
.post-list {
    margin-top: 20px;
}

/* 投稿内容のスタイル */
.post-header {
    font-size: 0.9rem;
    color: #7a746b;
}

.post-message {
    margin-top: 10px;
    margin-bottom: 10px;
}

/* ボタンやリンクの余白調整 */
.post-actions a,
.post-vote {
    margin-right: 10px;
}

/* ID カウントリンクのスタイル */
.post-user-id {
    color: #8a6d3b;
}

.post-user-id:hover {
    text-decoration: underline;
}

/* 区切り線の調整 */
hr {
    margin-top: 20px;
    margin-bottom: 20px;
}

/* ファイル表示部ベース設定 */
.grid-item {
    position: relative;
    display: inline-block;
    width: 100%; /* デフォルトは1列表示 */
    margin-bottom: 16px;
}

/* 画像のレスポンシブスタイル */
.responsive-img {
    width: 33%;
    height: auto;
}

/* タブレットサイズ（2列表示） */
@media (min-width: 576px) {
    .grid-item {
        width: 25% !important;
    }
}

/* デスクトップサイズ（4列表示） */
@media (min-width: 768px) {
    .grid-item {
        width: 20% !important;
    }
}

/* 大画面（4列表示） */
@media (min-width: 992px) {
    .grid-item {
        width: 20% !important;
    }
}

/* 超大画面（6列表示） */
@media (min-width: 1200px) {
    .grid-item {
        width: 16.66% !important;
    }
}

/* ファイルサイズオーバーレイを画像の下に表示するスタイル */
.file-size-overlay {
    display: block; /* 幅を100%に広げるため */
    background-color: rgba(0, 0, 0, 0.3); /* 背景色 */
    color: #fff;
    width: 100%; /* 画像と同じ幅で表示 */
    padding: 3px 0;
    font-size: 0.8rem;
    font-weight: bold;
    text-align: center;
    border-radius: 0 0 4px 4px; /* 下部だけ角を丸く */
    box-sizing: border-box;
}

/* 画像の下に表示するための調整 */
.file-item img {
    display: block;
}

.file-list-link {
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
}